<?php
//TODO: site_root extracten
define('SITE_ROOT','http://localhost:90/ihelp');

require_once (ROOT . DS . 'library' . DS . 'phptal' . DS . 'PHPTAL.php');

// create a new template object
$template = new PHPTAL(VIEW_TEMPLATE_FOLDER . DS . 'stocks' . DS . 'productmanager.html');

$template->cssRootFolderUrl = SITE_ROOT . DS . "css" . DS;
$template->imgRootFolderUrl = SITE_ROOT . DS . "img" . DS;

class DB {
	public function insert($name){
		echo "ok";
		"hello " . $name;
	}
}
$template->db = new DB();
$template->stock = $stock;

$template->tableName = "v_stocks";
$template->insertProductActionUrl = SITE_ROOT . DS ."actions" . DS . "insertProduct";

$template->set('productName', "product_name" );

// execute the template
try {
    echo $template->execute();
}
catch (Exception $e){
    echo $e;
}
?>